<div id="top-panel">
    <div id="panel">
        <ul>
            <li><a href="<?php echo site_url("kiosk"); ?>" class="report_seo">List</a></li>			
        </ul>
    </div>
</div>
<div id="wrapper">
	<div id="content">
		<div id="rightnow">
			<h3 class="reallynow">New Item</h3>
			<div>
				<?php echo validation_errors(); ?>
			</div>
			<?php echo form_open('kiosk/save') ?>
			<input type="hidden" name="id" id="id" value="<?php echo isset($kiosk['id']) ? $kiosk['id'] : '';  ?>" />
			<table width="100%">
				<tr>
					<td>MacAddress</td>
					<td><input type="text" name="mac_address" id="mac_address" class="input" value="<?php echo isset($kiosk['mac_address']) ? $kiosk['mac_address'] : '';?>" /></td>
				</tr>
				<tr>
					<td>Name</td>
					<td><input type="text" name="name" id="name" class="input" value="<?php echo isset($kiosk['name']) ? $kiosk['name'] : '';?>" /></td>
				</tr>
				<tr>
					<td>Password</td>
					<td><input type="password" name="password" id="password" class="input" />
					<?php if(isset($kiosk['password']) && !empty($kiosk['password'])): ?>
							<br />Your current password: <?php echo preg_replace('/./', '*', $kiosk['password']); ?><br />
							Please blank it if do not want to change password
					<?php endif; ?>
					</td>
				</tr>
				<tr>
					<td>Location</td>
					<td>
						<select name="location_id" class="input1">
						<?php if(count($location)>0): ?>
						<?php foreach($location as $v): ?>
							<option value="<?php echo $v['id'];?>" <?php if(isset($kiosk['location_id']) && $v['id']==$kiosk['location_id']):?> selected="selected" <?php endif;?>><?php echo $v['address'];?>, <?php echo $v['city'];?>, <?php echo $v['c_name'];?></option>
						<?php endforeach; ?>
						<?php endif; ?>
						</select>	
					</td>
				</tr>	
				<tr>
					<td>Description</td>
					<td><textarea name="description" class="input_textarea"><?php echo isset($kiosk['description']) ? $kiosk['description'] : '';  ?></textarea></td>
				</tr>			
				<tr>
					<td>&nbsp;</td>
					<td><input type="submit" value="Save" >
						<input type="button" value="Cancel" class="btcancel" />
					</td>
				<tr>
			</table>
		</div>
	</div>
</div>